/*
 *  版权所有：路比信息科技有限公司
 * @author Lcfgly<kinwyb@mp189.com>
 * @version 0.1
 * @Date 2015-6-5
 */

package lcfgly.database.utils;

import java.util.HashMap;
import lcfgly.utils.PHPSerializer;

/**
 * test
 * @author Lcfgly<kinwyb@mp189.com>
 * @Date 2015-6-5 16:50:18
 * @version 1.0
 */
public class test {

    public static void main(String[] args) {
//        String s="a:3:{s:21:\"spec_private_value_id\";a:1:{i:1;s:11:\"14268320125\";}s:10:\"spec_value\";a:1:{i:1;s:3:\"5.4\";}s:13:\"spec_value_id\";a:1:{i:1;s:1:\"5\";}}";
//        String s="a:3:{s:21:\"spec_private_value_id\";a:1:{i:1;s:11:\"14268371279\";}s:10:\"spec_value\";a:1:{i:1;s:3:\"8.1\";}s:13:\"spec_value_id\";a:1:{i:1;s:1:\"9\";}}";
//        String s="a:3:{s:21:\"spec_private_value_id\";a:2:{i:10;s:12:\"143035765277\";i:11;s:13:\"1430357652101\";}s:10:\"spec_value\";a:2:{i:10;s:12:\"上黑有刺\";i:11;s:4:\"0.1#\";}s:13:\"spec_value_id\";a:2:{i:10;s:2:\"77\";i:11;s:3:\"101\";}}";
//        String s="a:3:{s:21:\"spec_private_value_id\";a:2:{i:10;s:12:\"143036288377\";i:11;s:13:\"1430362883100\";}s:10:\"spec_value\";a:2:{i:10;s:12:\"上黑有刺\";i:11;s:3:\"16#\";}s:13:\"spec_value_id\";a:2:{i:10;s:2:\"77\";i:11;s:3:\"100\";}}";
//        String s="a:3:{s:21:\"spec_private_value_id\";a:2:{i:19;s:13:\"1431933241135\";i:20;s:13:\"1431933241146\";}s:10:\"spec_value\";a:2:{i:19;s:6:\"藻香\";i:20;s:3:\"鲤\";}s:13:\"spec_value_id\";a:2:{i:19;s:3:\"135\";i:20;s:3:\"146\";}}";
        String s="a:1:{i:1;a:7:{i:14268371273;a:4:{s:21:\"private_spec_value_id\";s:11:\"14268371273\";s:10:\"spec_value\";s:3:\"4.5\";s:13:\"spec_value_id\";s:1:\"3\";s:17:\"spec_goods_images\";s:0:\"\";}i:14268371274;a:4:{s:21:\"private_spec_value_id\";s:11:\"14268371274\";s:10:\"spec_value\";s:3:\"4.8\";s:13:\"spec_value_id\";s:1:\"4\";s:17:\"spec_goods_images\";s:0:\"\";}i:14268371275;a:4:{s:21:\"private_spec_value_id\";s:11:\"14268371275\";s:10:\"spec_value\";s:3:\"5.4\";s:13:\"spec_value_id\";s:1:\"5\";s:17:\"spec_goods_images\";s:0:\"\";}i:14268371276;a:4:{s:21:\"private_spec_value_id\";s:11:\"14268371276\";s:10:\"spec_value\";s:3:\"5.7\";s:13:\"spec_value_id\";s:1:\"6\";s:17:\"spec_goods_images\";s:0:\"\";}i:14268371277;a:4:{s:21:\"private_spec_value_id\";s:11:\"14268371277\";s:10:\"spec_value\";s:3:\"6.3\";s:13:\"spec_value_id\";s:1:\"7\";s:17:\"spec_goods_images\";s:0:\"\";}i:14268371278;a:4:{s:21:\"private_spec_value_id\";s:11:\"14268371278\";s:10:\"spec_value\";s:3:\"7.2\";s:13:\"spec_value_id\";s:1:\"8\";s:17:\"spec_goods_images\";s:0:\"\";}i:14268371279;a:4:{s:21:\"private_spec_value_id\";s:11:\"14268371279\";s:10:\"spec_value\";s:3:\"8.1\";s:13:\"spec_value_id\";s:1:\"9\";s:17:\"spec_goods_images\";s:0:\"\";}}}";
        String ss="a:3:{s:21:\"spec_private_value_id\";a:2:{i:19;s:13:\"1431933241136\";i:20;s:13:\"1431933241146\";}s:10:\"spec_value\";a:2:{i:19;s:6:\"螺香\";i:20;s:3:\"鲤\";}s:13:\"spec_value_id\";a:2:{i:19;s:3:\"136\";i:20;s:3:\"146\";}}";
        try {
            HashMap map=(HashMap)PHPSerializer.unserialize(s.getBytes());
            System.out.println(map.toString());
            HashMap maps=(HashMap)PHPSerializer.unserialize(ss.getBytes());
            System.out.println(maps.toString());
        } catch (IllegalAccessException ex) {
            System.out.println(ex.getMessage());
        }
    }
    
}
